import { request } from '@ruifox-cms/utils'

// 查看所有团队
export function selectGroupList(params) {
    return request({
        url: '/provider/group/selectList',
        method: 'get',
        params
    })
}
// 分页查看团队
export function selectGroupPage(params) {
    return request({
        url: '/provider/group/selectPage',
        method: 'get',
        params
    })
}

// 删除团队
export function deleteGroup(data) {
    return request({
        url: '/provider/group/delete',
        method: 'post',
        data
    })
}
// 批量删除团队
export function deleteGroupBatch(data) {
    return request({
        url: '/provider/group/deleteList',
        method: 'post',
        data
    })
}

// 修改团队
export function updateGroup(data) {
    return request({
        url: '/provider/group/update',
        method: 'post',
        data
    })
}

// 添加团队
export function insertGroup(data) {
    return request({
        url: '/provider/group/insert',
        method: 'post',
        data
    })
}


// 查看团队成员
export function selectGroupMemberPage(params) {
    return request({
        url: '/provider/group/selectRAMUser',
        method: 'get',
        params
    })
}
// 团队id查询团队成员
export function selectGroupMemberById(params) {
    return request({
        url: '/provider/group/selectRAMUserByGroupId',
        method: 'get',
        params
    })
}
// 添加团队成员
export function insertGroupMember(data) {
    return request({
        url: '/provider/group/addRAMUser',
        method: 'post',
        data
    })
}
// 删除团队成员
export function deleteGroupMember(data) {
    return request({
        url: '/provider/group/banRAMUser',
        method: 'post',
        data
    })
}
// 修改团队可查看的系统词库
export function updateGroupStore(data) {
    return request({
        url: '/provider/group/updateGroupStore',
        method: 'post',
        data
    })
}
// 获取团队管理员所有权限
export function selectGroupAdminMenu() {
    return request({
        url: '/provider/group/selectGroupAdminMenu',
        method: 'get',
    })
}
// 获取RAM用户权限
export function selectRAMUserMenu(params) {
    return request({
        url: '/provider/group/selectRAMUserMenu',
        method: 'get',
        params
    })
}
// 修改RAM用户权限
export function updateRAMUserMenu(data) {
    return request({
        url: '/provider/group/updateRAMUserMenu',
        method: 'post',
        data
    })
}